if has('nvim-0.9.1') && get(g:, 'nvim_treesitter_install', UNIX() && !CYGWIN())
    PlugAdd 'kevinhwang91/nvim-treesitter'
    PlugAdd 'm-demare/hlargs.nvim'
endif
if Planned('nvim-treesitter')
    PlugAdd 'nvim-treesitter/nvim-treesitter-textobjects'
elseif exists('*search') && exists('*getpos') && g:complete_engine != 'coc'
    PlugAdd 'thinca/vim-textobj-function-perl', {'for': 'perl'}
    PlugAdd 'kentaro/vim-textobj-function-php', {'for': 'php'}
    PlugAdd 'thinca/vim-textobj-function-javascript', {'for': ['javascript', 'typescript']}
    PlugAdd 'bps/vim-textobj-python', {'for': 'python'}
endif
if !Planned('nvim-treesitter') && Require('c') && (Planned('coc.nvim') || Planned('nvim-cmp'))
    PlugAdd 'jackguo380/vim-lsp-cxx-highlight', {'for': g:c_filetypes}
endif
if g:has_truecolor
    PlugAdd 'sainnhe/edge'
    PlugAdd 'sainnhe/sonokai'
    PlugAdd 'sainnhe/everforest'
    if has('nvim-0.8.1')
        PlugAdd 'folke/tokyonight.nvim'
        PlugAdd 'catppuccin/nvim', {'as': 'catppuccin'}
    else
        PlugAdd 'sainnhe/gruvbox-material'
    endif
endif
